package com.net.oil.order.presenter;

import com.net.oil.base.BasePresenter;
import com.net.oil.order.bean.MaintainListBean;
import com.net.oil.order.contract.MaintainListContract;
import com.net.oil.order.model.MaintainListModel;

/**
 * 作者：lch
 * 时间：2018/6/7 0007:下午 22:50
 * 邮箱：245850413@qq.com
 * 说明：
 */

public class MaintainListPresenter extends BasePresenter<MaintainListContract.View> implements MaintainListContract.Presenter {

    private MaintainListContract.View view;
    private MaintainListContract.Model model;

    public MaintainListPresenter(MaintainListContract.View view) {
        this.view = view;
        model = new MaintainListModel(this);
    }

    @Override
    protected void unSubscribe() {
        model.unSubscribe();
    }

    @Override
    public void getMaintainList(int myCarId, int page, int rows) {
        model.getMaintainList(myCarId, page, rows);
    }

    @Override
    public void getMaintainListSuccess(MaintainListBean maintainListBean) {
        view.getMaintainListSuccess(maintainListBean);
    }

    @Override
    public void getMaintainListFailed() {
        view.getMaintainListFailed();
    }
}
